pp108 : showItem Method (Tree)

showItem Method (Tree)


This method searches for the specified item in the tree, highlights the item, and expands all the higher levels until the current tree item. Returns the first item found.

Syntax


otreeItem = treeID.showItem(sText [, bInSensitive][, searchFullTree])

When called from a node other than root, the syntax is as follows:

treeNode.showItem(sText [, bInSensitive][, searchFullTree])

Parameters

Parameter

Description

sText

Required. String that specifies the description of the item to be search in the tree.

bInSensitive

Optional. Boolean that specifies whether the search is case-sensitive or not.trueSearch is case-insensitive.falseDefault. Search is case-sensitive.

searchFullTree

Optional. Boolean specifying whether entire tree must be searched (until item found), or just the available tree.

  • True - Searches entire tree, renders the tree until item found.
  • False - (Default) Searches available tree.


Return Value


Returns the first item found. If the particular item is not found, it returns NULL.

Example
function treeItemShow()
{
   var item = menutree.getSelectedItem();
   if (!item)
   {
        application.notify("select an item");
   }
   else
   {
        item.showItem("The Netherlands");
   }
}

See Also


tree